#ifndef PROPERTIES_H_
#define PROPERTIES_H_

#include <string>
#include <vector>

/// @brief 配置文件解析类
class Properties
{
public:
    bool Init(const char *properties_file);
    bool HasKey(const char *key);
    std::string Key(const char *key);
    void Add(const char *key, const char *val);
    int size() const;
    std::string ToString();
    std::string Key(int index);
    std::string Val(int index);

private:
    void Fill(std::string &prop);
    const char *file_path_ = nullptr;
    int size_ = 0;
    std::vector<std::string> keys_;
    std::vector<std::string> vals_;
};

#endif